<?php

namespace Portal\InvoiceBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Invoice
 *
 * @ORM\Table(name="invoice")
 * @ORM\Entity
 */
class Invoice
{
    /**
     * @var integer
     *
     * @ORM\Column(name="ID", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var float
     *
     * @ORM\Column(name="AMOUNT", type="float", nullable=true)
     */
    private $amount;

    /**
     * @var string
     *
     * @ORM\Column(name="CONTENT", type="text", nullable=true)
     */
    private $content;

    /**
     * @var integer
     *
     * @ORM\Column(name="TEMPLATE_ID", type="integer", nullable=true)
     */
    private $templateId;

    /**
     * @var integer
     *
     * @ORM\Column(name="IS_COMPLETED", type="integer", nullable=true)
     */
    private $isCompleted;

    /**
     * @var float
     *
     * @ORM\Column(name="AMOUNT_PAID", type="float", nullable=true)
     */
    private $amountPaid;

    /**
     * @var integer
     *
     * @ORM\Column(name="DISCOUNT_ID", type="integer", nullable=true)
     */
    private $discountId;

    /**
     * @var integer
     *
     * @ORM\Column(name="IS_ACTIVE", type="integer", nullable=true)
     */
    private $isActive;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="CREATED_AT", type="datetime", nullable=true)
     */
    private $createdAt;

    /**
     * @var \Contract
     *
     * @ORM\ManyToOne(targetEntity="Contract")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="CONTRACT_ID", referencedColumnName="ID")
     * })
     */
    private $contract;

    /**
     * @var \User
     *
     * @ORM\ManyToOne(targetEntity="User")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="USER_ID", referencedColumnName="ID")
     * })
     */
    private $user;



    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set amount
     *
     * @param float $amount
     * @return Invoice
     */
    public function setAmount($amount)
    {
        $this->amount = $amount;
    
        return $this;
    }

    /**
     * Get amount
     *
     * @return float 
     */
    public function getAmount()
    {
        return $this->amount;
    }

    /**
     * Set content
     *
     * @param string $content
     * @return Invoice
     */
    public function setContent($content)
    {
        $this->content = $content;
    
        return $this;
    }

    /**
     * Get content
     *
     * @return string 
     */
    public function getContent()
    {
        return $this->content;
    }

    /**
     * Set templateId
     *
     * @param integer $templateId
     * @return Invoice
     */
    public function setTemplateId($templateId)
    {
        $this->templateId = $templateId;
    
        return $this;
    }

    /**
     * Get templateId
     *
     * @return integer 
     */
    public function getTemplateId()
    {
        return $this->templateId;
    }

    /**
     * Set isCompleted
     *
     * @param integer $isCompleted
     * @return Invoice
     */
    public function setIsCompleted($isCompleted)
    {
        $this->isCompleted = $isCompleted;
    
        return $this;
    }

    /**
     * Get isCompleted
     *
     * @return integer 
     */
    public function getIsCompleted()
    {
        return $this->isCompleted;
    }

    /**
     * Set amountPaid
     *
     * @param float $amountPaid
     * @return Invoice
     */
    public function setAmountPaid($amountPaid)
    {
        $this->amountPaid = $amountPaid;
    
        return $this;
    }

    /**
     * Get amountPaid
     *
     * @return float 
     */
    public function getAmountPaid()
    {
        return $this->amountPaid;
    }

    /**
     * Set discountId
     *
     * @param integer $discountId
     * @return Invoice
     */
    public function setDiscountId($discountId)
    {
        $this->discountId = $discountId;
    
        return $this;
    }

    /**
     * Get discountId
     *
     * @return integer 
     */
    public function getDiscountId()
    {
        return $this->discountId;
    }

    /**
     * Set isActive
     *
     * @param integer $isActive
     * @return Invoice
     */
    public function setIsActive($isActive)
    {
        $this->isActive = $isActive;
    
        return $this;
    }

    /**
     * Get isActive
     *
     * @return integer 
     */
    public function getIsActive()
    {
        return $this->isActive;
    }

    /**
     * Set createdAt
     *
     * @param \DateTime $createdAt
     * @return Invoice
     */
    public function setCreatedAt($createdAt)
    {
        $this->createdAt = $createdAt;
    
        return $this;
    }

    /**
     * Get createdAt
     *
     * @return \DateTime 
     */
    public function getCreatedAt()
    {
        return $this->createdAt;
    }

    /**
     * Set contract
     *
     * @param \Portal\InvoiceBundle\Entity\Contract $contract
     * @return Invoice
     */
    public function setContract(\Portal\InvoiceBundle\Entity\Contract $contract = null)
    {
        $this->contract = $contract;
    
        return $this;
    }

    /**
     * Get contract
     *
     * @return \Portal\InvoiceBundle\Entity\Contract 
     */
    public function getContract()
    {
        return $this->contract;
    }

    /**
     * Set user
     *
     * @param \Portal\InvoiceBundle\Entity\User $user
     * @return Invoice
     */
    public function setUser(\Portal\InvoiceBundle\Entity\User $user = null)
    {
        $this->user = $user;
    
        return $this;
    }

    /**
     * Get user
     *
     * @return \Portal\InvoiceBundle\Entity\User 
     */
    public function getUser()
    {
        return $this->user;
    }
}